﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using CapaDeEntidades;
using CapaNegocio;

namespace Biblioteca
{
    public partial class RegistrarLibro : System.Web.UI.Page
    {
        public object SocioLogueado
        {
            get { return Session["Socio"]; }
            set { Session["Socio"] = value; }
        }


        void Page_PreInit(object sender, EventArgs e)
        {
            Socio socio = new Socio();
            socio = (Socio)SocioLogueado;
            socio.Usuario = "admin";
            if (socio.Usuario == "admin")
                MasterPageFile = "~/MasterPageAdministrador.Master";
            else
                MasterPageFile = "~/MasterMenu.Master";
        }



        protected void Page_Load(object sender, EventArgs e)
        {
            Socio socio = (Socio)Session["Usuario"];
            SocioLogueado = socio;           
            this.PreInit += new EventHandler(Page_PreInit);
        }



    }
}
